const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave:false, //关闭eslint检查
  // 解决跨域问题
  devServer: {
    proxy: {
      '/api': {
        //target: 'https://www.maoyan.com/',   //目标地址，请求后台接口
        target: process.env.VUE_APP_BASE_URL,   //目标地址，请求后台接口
        ws: true,
        changeOrigin: true,
        pathRewrite: {  // 路径重写
          "^/api": '' 
        }
      },
      '/foo': {
        target: 'https://bang.360.cn',   //目标地址，请求后台接口
        ws: true,
        changeOrigin: true,
        pathRewrite: {  // 路径重写
          "^/foo": ''
        }
      }
    },
  }
})
